﻿package part_06_Homework;

import java.util.Scanner;

/*
 * 	 统计班级人数中80分以上比例
 */
public class Work_06 {
	public static void main(String[] args) {
		int time = 0;
		double avg;
		Scanner sc = new Scanner(System.in);
		System.out.print("请输入学生人数：");
		int num = sc.nextInt();
		for(int i=1;i<=num;i++){
			System.out.print("请输入第"+i+"位学生的成绩：");
			double score = sc.nextDouble();
			if(score<80){
				continue;
			}
			time++;
		}
		System.out.println("80分以上的学生有"+time+"人");
		avg = (double)time/num*100;
		System.out.println("所占班级比例为："+avg+"%");	
	}
}